Object.defineProperty(exports, "__esModule", { value: !0 }),
  (exports.default = void 0);
var o,
  t =
    (o = require("./model/IntegrationLocationProvider")) && o.__esModule
      ? o
      : { default: o };
exports.default = Behavior({
  data: {},
  attached: function () {
    (this.locationProvider = t.default.getInstance()),
      this.locationProvider.isInit || this.locationProvider.startLocation(),
      this.onLocationChange &&
        this.locationProvider.on("locationChange", this.onLocationChange),
      console.log("====attached");
  },
  detached: function () {
    console.log("====detached"),
      this.onLocationChange &&
        this.locationProvider.off("locationChange", this.onLocationChange);
  },
  pageLifetimes: {
    show: function () {
      var o = this;
      wx.startCompass(),
        wx.onCompassChange(function (t) {
          o.onCompassChange && o.onCompassChange(t);
        }),
        this.locationProvider && this.locationProvider.onAppShow();
    },
    hide: function () {
      wx.stopCompass(),
        this.locationProvider && this.locationProvider.onAppHide();
    },
  },
  methods: {},
});
